import 'package:flutter/material.dart';

class RegisterPage extends StatefulWidget {
  RegisterPage({Key key}) : super(key: key);

  @override
  _RegisterPageState createState() => _RegisterPageState();
}

class _RegisterPageState extends State<RegisterPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('第一步-输入手机号'), 
      ), 
      body: Center(
       child: Column(
        children: <Widget>[
          SizedBox(height: 40),
          Text('这是注册第一步，请输入您的手机号，然后点击下一步'),
          SizedBox(height: 20),
          RaisedButton(
            child: Text('下一步'),
            onPressed: (){
              Navigator.pushNamed(context, '/registerNext');

              // 替换路由，将下一步的页面替换成当前页面
              // Navigator.of(context).pushReplacementNamed('/registerNext'); 
            }
          )
        ], 
      ), 
      )
    );
  }
}